package com.gears_software.sxdc.dccx.ui.view;

import android.content.Context;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.gears_software.sxdc.dccx.R;
import com.gears_software.sxdc.dccx.application.DCCXApplication;
import com.gears_software.sxdc.dccx.data.model.Cities;
import com.gears_software.sxdc.dccx.data.model.LineInfoModel;

import org.androidannotations.annotations.App;
import org.androidannotations.annotations.EViewGroup;
import org.androidannotations.annotations.ViewById;

/**
 * Created by SunMuran on 2017/7/24.
 */
@EViewGroup(R.layout.list_item_cities)
public class HistoryItemView extends LinearLayout {
    @App
    DCCXApplication app;
    @ViewById
    TextView tv_city_chufadi;
    @ViewById
    TextView tv_jiantou;
    @ViewById
    TextView tv_city_mudidi;
    Context context;

    public HistoryItemView(Context context) {
        super(context);
        this.context = context;
    }

    public void bind(LineInfoModel line) {
        tv_city_chufadi.setText(line.getStartpoint());
        tv_city_mudidi.setText(line.getEndpoint());
        tv_jiantou.setTypeface(app.iconfont);
    }

}
